libxl: fix bootloader args setting
authorZhigang Wang <zhigang.x.wang@oracle.com>
Thu, 9 Feb 2012 18:41:03 +0000 (18:41 +0000)
committerZhigang Wang <zhigang.x.wang@oracle.com>
Thu, 9 Feb 2012 18:41:03 +0000 (18:41 +0000)
commit6f77e95164674e38738bbd55572555d49657c76a
tree8694a27b536b7e1886bbec8fb143f9a226d7ea34
parented4779111f938d38ddc935cbef252784f70c482b
libxl: fix bootloader args setting

When bootloader_args = ['foo', 'bar'], then info->u.pv.bootloader_args =

    foo\0
    bar\0
    \0

Before this patch, 'p++' points to the next character of 'foo\0' and never
comes to 'bar\0' (because of the '\0' in 'foo\0'), so the args will be:

    args[0] = 'oo\0'
    args[1] = 'o\0'

After this patch, 'p++' points to the next string of pv.bootloader_args, so we
get the correct args:

    args[0] = 'foo\0'
    args[1] = 'bar\0'

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_bootloader.c